package il.ac.biu.cs.grossmm.api.server;

/**
 * Representation of a loader. A loader loads a server component or interface by
 * a hint. A loader should always return the same object for a hint (as opposed
 * to creation/loadeing a different object instance).
 * 
 * @see LoaderSupport
 */
public interface Loader {
	/**
	 * loads and wraps a server component or interface by a hint
	 * 
	 * @param wrapper
	 *            a wrapper which should be used to wrap the loaded object
	 * @param hint
	 *            the hint of the server service or component
	 * @return wrapped server object
	 * @throws Exception
	 */
	Wrapped load(Wrapper wrapper, Object hint) throws Exception;
}
